﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMSPanasonic.Business;
namespace SMSPanasonic
{
    public abstract class SMSPanasonicMTRouterSending
    {
        //id cua router
        private SmsRouter _sms_router;
        //Object dung de gui tin nhan cua router
        private object _sms_router_object;
        //Router nay phuc vu cho thread nao
        private int _thread_id;
        //So lan goi lai khi xay ra fail
        private int _retry_on_fail_req_times;
        //Thoi gian goi lai khi xay ra fail
        private long _retry_on_fail_req_duration;
        //So lan goi lai khi xay ra timeout
        private int _retry_on_time_out_req_times;
        //Thoi gian goi lai khi xay ra timeout
        private long _retry_on_time_out_req_duration;
        public string _status_selected;
        public string _status_updated;

        public SMSPanasonicMTRouterSending()
        {
        }

        public abstract void SendSms(List<SmsMtWaiting> smsMtWaitingList);

        public virtual object SmsRouterObject   // Abstract property
        {
            get
            {
                return _sms_router_object;
            }
            set
            {
                _sms_router_object = value;
            }
        }

        public virtual SmsRouter SmsRouter   // Abstract property
        {
            get
            {
                return _sms_router;
            }
            set
            {
                _sms_router = value;
            }
        }

        public virtual int ThreadID
        {
            get
            {
                return _thread_id;
            }
            set
            {
                _thread_id = value;
            }
        }

        public virtual int RetryOnFailReqTimes
        {
            get
            {
                return _retry_on_fail_req_times;
            }
            set
            {
                _retry_on_fail_req_times = value;
            }
        }

        public virtual long RetryOnFailReqDuration
        {
            get
            {
                return _retry_on_fail_req_duration;
            }
            set
            {
                _retry_on_fail_req_duration = value;
            }
        }
        public virtual long RetryOnTimeOutReqDuration
        {
            get
            {
                return _retry_on_time_out_req_duration;
            }
            set
            {
                _retry_on_time_out_req_duration = value;
            }
        }

        public virtual int RetryOnTimeOutReqTimes
        {
            get
            {
                return _retry_on_time_out_req_times;
            }
            set
            {
                _retry_on_time_out_req_times = value;
            }
        }

    }
}
